<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
        xmlns:icecore="http://www.icefaces.org/icefaces/core"
       xmlns:ace="http://www.icefaces.org/icefaces/components"
       xmlns:ice="http://www.icesoft.com/icefaces/component"
       xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title><h:form><h:outputText>Vorlesung #{lectureBean.lecture.info.name} belegen</h:outputText></h:form></title>
    </h:head>
    <h:body>
        <ui:composition template="WEB-INF/templates/lecture.xhtml">
            <ui:define name="content">
                <h:form id="form2">
                    <h:outputText>Anmeldung für die Vorlesung #{lectureBean.lecture.info.name}</h:outputText>
                    <br />
                    <ice:outputText>An Übungen teilnehmen</ice:outputText> 
                    <ice:selectBooleanCheckbox  value="#{accountingBean.takePartExerciseGroups}"
                                                partialSubmit="true">
                    </ice:selectBooleanCheckbox><br />                    
                    <br />        
                    <ice:panelSeries var="row"
                                     value="#{accountingBean.options}"
                                     varStatus="stat">
                        <ice:outputText value="Wunschtermin Nr. #{stat.index+1}" 
                                        rendered="#{accountingBean.numOptions >= 1}"
                                        />
                        <br/>
                        <ice:selectOneMenu value="#{accountingBean.options[stat.index]}"
                                           partialSubmit="true"
                                           disabled="#{!accountingBean.takePartExerciseGroups}"
                                          >
                            <f:selectItems value="#{accountingBean.getGroupsForSelection(stat.index)}" />
                         </ice:selectOneMenu>
                        <br />
                       </ice:panelSeries>
                        <ice:commandButton value="Submit"
                                           action="#{accountingBean.doAccounting}"/>
                        <ice:messages></ice:messages>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
